home *** CD-ROM | disk | FTP | other *** search
- //
- // Priest Prophet unit AI file
- //
- // Behaviors:
- //
- // At players request, convert enemy units. Heal friendlies. Cast calamities.
- //
- // Notes:
- //
- // Add transition from Idle when enemies spotted to flee.
- //
- // Known Problems:
- //
-
- FaceEnemyUnit
- {
- allof(GoalIsCalamity,EnemyUnitDestroyed) true(Idle)
- allof(GoalIsCalamity,FacingEnemyUnit) true(CalamityPreCast)
- }
-
- ReacquireGoal
- {
- allof(GoalIsCalamity,EnemyUnitDestroyed) true(Idle)
- allof(GoalIsCalamity,UnitInWeaponRange) true(CalamityPreCast)
- GoalIsCalamity true(PrepareToMove)
- }
-
- CalamityPreCast
- {
- CalamityTargetStillValid true(CastCalamity) false(Idle)
- }
-
- // only for old saved games
- PrepareToCastCalamity
- {
- AlwaysTrue true(CastCalamity)
- }
-
- CastCalamity
- {
- allof(OwnerIsHuman,OneSecondElapsed) true(Idle)
- allof(OwnerIsComputer,OneSecondElapsed) true(PostCalamityFlee)
- }
-
- GetNextMoveWaypoint
- {
- allof(GoalIsCalamity,EnemyUnitDestroyed) true(Idle)
- allof(GoalIsCalamity,NextWaypointRetrieved,UnitInWeaponRange) true(FaceEnemyUnit)
- }
-
- PrepareToMove
- {
- allof(GoalIsCalamity,UnitInWeaponRange) true(FaceEnemyUnit)
- }
-
- InitialAttackState
- {
- //Reloaded false(WaitForReload)
- GoalIsCalamity true(PrepareToMove)
- }
-
- PostCalamityFlee
- {
- AlwaysTrue true(Idle)
- }
-
- #include("Priest.tai")
-
- // if nothing else works, at least go idle so that we can heal -rms
- UnderAttack
- {
- AlwaysTrue true(Idle)
- }
-
- #include("Healer.tai")
-
- #include("Generic Movement.tai")
-
- GetNextMoveWaypoint
- {
- NextWaypointRetrieved remove()
- allof(GoalIsCalamity,NextWaypointRetrieved) true(Advance)
- GoalIsCalamity true(FaceEnemyUnit)
- NextWaypointRetrieved true(LookForEnemies) false(TurnToUnitFacing)
- }
-
- #include("Generic Death.tai")
-
- #include("Move To Transport.tai");
-
-